<html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <!-- jQuery -->
    <script type="text/javascript" src="../../js/jquery-3.3.1.js"></script>
    <script type="text/javascript" src="../../js/jquery-1.11.0.min.js"></script>

    <!-- Bootstrap -->
    <link href="../../bootstrap-3.3.7-dist/css/bootstrap.min.css" rel="stylesheet">
    <!-- 加载 Bootstrap 的所有 JavaScript 插件。你也可以根据需要只加载单个插件。 -->
    <script src="../../bootstrap-3.3.7-dist/js/bootstrap.min.js"></script>
    <style type="text/css">
        th{
            text-align: center;
        }
        td{
            text-align: center;
        }

        #title{
            background-color: cornflowerblue;
        }

        .row-margin-top {
            margin-top: 10px;
        }



    </style>
    <script>

        $(function () {
            //点击新增按钮弹出模态框
            $("#seat_add_btn").click(function () {
                // reset_form("#seat_add_Modal form");
                //
                // //获取演出厅
                // var id =GetQueryString('studioId');
                // getstudio(id);

                //弹出模态框
                $("#seat_add_Modal").modal({
                    backdrop: "static"
                });
            });


            //编辑按钮打开模态框
            $(document).on("click", ".seatBtn", function () {
                reset_form("#seat_update_Modal form");
                getstudio($(this).attr("studio-Id"));
                getseat($(this).attr("edit-id"));
                $("#seat_update_btn").attr("edit-id", $(this).attr("edit-id"));
                $("#seat_del_btn").attr("del-id", $(this).attr("edit-id"));
                $("#seat_update_Modal").modal({
                    backdrop: "static"
                });
            });

        })


    </script>



</head>
<body>


<!--页面主体-->
<div class="container-fluid " >
    <div class = "row ">

        <div class="col-md-4 col-md-offset-5">
            <h1>座位管理</h1>
        </div>
    </div>
    <div class = "row row-margin-top">
        <div class="col-md-1 col-md-offset-9">
            <button id="seat_add_btn" class="btn btn-info btn-sm" ><span class="glyphicon  glyphicon-edit" aria-hidden="true" ></span>新增</button>    </div>
    </div>

    <div class="row row-margin-top">
        <div class="col-md-8 col-md-offset-2">
            <table id="seat_table" class="table table-bordered table-striped">
                <thead>

                </thead>
                <tbody>

                </tbody>
            </table>
        </div>
    </div>
</div>


<!--修改座位的模态框-->
<!-- Modal -->
<div class="modal fade" id="seat_update_Modal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                <h4 class="modal-title" id="ModalLabel">修改座位</h4>
            </div>
            <div class="modal-body">
                <form class="form-horizontal">

                    <div class="form-group">
                        <label class="col-sm-2 control-label">影厅名称</label>
                        <div class="col-sm-8">
                            <p class="form-control-static" id="updateStudioId" name="studioId" ></p>
                        </div>
                    </div>

                    <div class="form-group">
                        <label class="col-sm-2 control-label">座位行号</label>
                        <div class="col-sm-10">
                            <p class="form-control-static" id="seatRow_update_input" name="seatRow"></p>
                        </div>
                    </div>

                    <div class="form-group">
                        <label class="col-sm-2 control-label">座位列号</label>
                        <div class="col-sm-10">
                            <p class="form-control-static" id="seatCol_update_input" name="seatCol"></p>
                        </div>
                    </div>

                    <div class="form-group">
                        <label class="col-sm-2 control-label">座位状态</label>
                        <div class="col-sm-10">
                            <select class="form-control" name="seatStatus" id="seatStatus_update_input" >
                                <option value="1" >可用</option>
                                <option value="0" >不可用</option>
                            </select>
                        </div>
                    </div>
                </form>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-primary" id="seat_update_btn">修改</button>
                <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                <button type="button" class="btn btn-danger" id="seat_del_btn">删除</button>
            </div>
        </div>
    </div>
</div>


<!--添加座位的模态框-->
<!-- Modal -->
<div class="modal fade" id="seat_add_Modal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                <h4 class="modal-title" id="myModalLabel">添加座位</h4>
            </div>
            <div class="modal-body">
                <form class="form-horizontal">

                    <div class="form-group">
                        <label class="col-sm-2 control-label">影厅名称</label>
                        <div class="col-sm-10">
                            <p class="form-control-static" id="addStudioId" name="studioId"></p>
                        </div>
                    </div>

                    <div class="form-group">
                        <label class="col-sm-2 control-label">座位行号</label>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" id="seatRow_add_input" placeholder="seatRow" name="seatRow">
                            <span class="help-block"></span>
                        </div>
                    </div>

                    <div class="form-group">
                        <label class="col-sm-2 control-label">座位列号</label>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" id="seatCol_add_input" placeholder="seatCol" name="seatCol">
                            <span class="help-block"></span>
                        </div>
                    </div>

                    <div class="form-group">
                        <label class="col-sm-2 control-label">座位状态</label>
                        <div class="col-sm-10">
                            <select class="form-control" name="seatStatus" id="seatStatus_add_input" >
                                <option value="1" >可用</option>
                                <option value="0" >不可用</option>
                            </select>

                        </div>
                    </div>
                </form>

            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                <button type="button" class="btn btn-primary" id="seat_save_btn">保存</button>
            </div>
        </div>
    </div>
</div>
</body>
</html>